/**
 * @Date 2023-02-21 10:48:50
 * @Remark
 */

import _ from "lodash";

function getOption(data: NumStrMap) {
  return _.map(data, (el, key) => {
    const item: NumOption = {
      code: parseInt(key, 10),
      name: el,
    };
    return item;
  });
}

// 管理员状态
export const ADMIN_STATUS: NumStrMap = {
  0: "不启用",
  1: "启用",
};

export const ADMIN_STATUS_OPTION = getOption(ADMIN_STATUS);

export const USE_STATUS = [
  { code: true, name: "启用" },
  { code: false, name: "不启用" },
];
